Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use Woocommerce Reset Password email for ResetPassword Mutation #878

Merged
merged 13 commits into from
Aug 6, 2024

Conversation

alexookah
Copy link
Contributor

@alexookah alexookah commented Jul 20, 2024

This PR enhances the WooCommerce GraphQL functionality by adding a custom filter for handling password reset emails within the WooCommerce_Filters class. The new filter, retrieve_password_message, ensures that password reset emails are generated using the WooCommerce reset password email template.

Purpose

The addition of the retrieve_password_message filter provides the following benefits:

  • Consistent User Experience: Users will receive password reset emails formatted according to the WooCommerce email template, ensuring consistency with other WooCommerce communications.
  • Enhanced Branding: By using WooCommerce's email template, the password reset process aligns with the overall branding and design of WooCommerce communications.
  • Improved Front-End Integration: Users are directed to the WooCommerce front-end reset password page, rather than the default WordPress reset page (which is a wordpress reset-password page /wp-login.php), providing a seamless and branded user experience.

This should PR resolves this issue

How to Disable

To revert to the default WordPress password reset email functionality, simply deactivate the "Customer Reset Password" email within the WooCommerce email settings. This will ensure that the standard WordPress password reset page is used instead of the WooCommerce front-end reset password page.

Where has this been tested?

  • **WooGraphQL Version: 0.20.0
  • **WPGraphQL Version: 1.27.2
  • **WordPress Version: 6.6
  • **WooCommerce Version: 9.1.2

Copy link
Member

@kidunot89 kidunot89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexookah Ping me when you've made the changes we worked out over Discord

@alexookah alexookah requested a review from kidunot89 July 28, 2024 21:00
@alexookah alexookah changed the title feat: Add pre_wp_mail_handler for Woocommerce emails feat: Add retrieve_password_message to use Woocommerce Reset Password email Jul 28, 2024
@alexookah alexookah changed the title feat: Add retrieve_password_message to use Woocommerce Reset Password email feat: Use Woocommerce Reset Password email for ResetPassword Mutation Jul 29, 2024
Copy link
Member

@kidunot89 kidunot89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexookah Approved. Just add the // TODO: , I mentioned in our Discord, if possible. Then we can get it merged.

@kidunot89 kidunot89 merged commit a37c68e into wp-graphql:develop Aug 6, 2024
11 of 15 checks passed
@alexookah alexookah deleted the reset_mail_woocommerce branch August 6, 2024 22:17
@kidunot89 kidunot89 added enhancement New feature or request bugfix Implements bugfix and removed bugfix Implements bugfix labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants